import React, {PropTypes} from 'react';
import {Router, Route, IndexRoute, Link, Redirect} from 'dva/router';

import Recognize from './components/Recognize';
import Editor from './components/Editor';
import Preview from './components/Preview';
import MainLayout from './components/MainLayout';

export default function ({history}) {

    return (
        <Router history={history}>
            <Route path="" component={MainLayout}>
                <Route path="/" component={Recognize}/>
                <Route path="/editor" component={Editor}/>
                <Route path="/preview" component={Preview}/>
                <Route path="*" component={Editor}/>
            </Route>
        </Router>
    );
}
